package com.fhm.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.conmon.Entity.Product;
import com.fhm.dao.HonePageDAO;
@WebServlet("/HomePage")
public class HomePageServlet extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		HonePageDAO one=new HonePageDAO();
		List<Product> list=one.query("brand001");
		request.setAttribute("list", list);
		List<Product> list2=one.query("brand002");
		request.setAttribute("list2", list2);
		List<Product> list3=one.query("brand003");
		request.setAttribute("list3", list3);
		List<Product> list4=one.query("brand004");
		request.setAttribute("list4", list4);
		List<Product> list5=one.query("brand005");
		request.setAttribute("list5", list5);
		List<Product> list6=one.query("brand006");
		request.setAttribute("list6", list6);
		request.getRequestDispatcher("homePage.jsp").forward(request, response);
	}
}
